#include "point.h"
#include <cmath>
#include <iostream>

Point::Point(): x(0), y(0){}

Point::Point(int xx, int yy): x(xx), y(yy){}

Point::Point(const Point& pt): x(pt.x), y(pt.y){}

int Point::getx() const { return x; }

int Point::gety() const { return y; }

void Point::calc(Point& pt)
{
	std::cout << sqrt((pt.getx() - x) * (pt.getx() - x) + (pt.gety() - y) * (pt.gety() - y)) << std::endl;
	return ;
}

Circle::Circle(): Point(0,0), radium(0){}

Circle::Circle(const Point pt, const int r): Point(pt), radium(r){}

Circle::Circle(const Circle& pt): Point(pt.getx(), pt.gety()), radium(pt.radium){}

int Circle::getradium() const { return radium; }

void Circle::calc(Circle &p)
{
	std::cout << abs(radium*radium - p.getradium()*p.getradium()) * 3.141592 << std::endl;
	return ;
}

